00001 <?php 00002 /*--------------------------------------------------------------------------+ 00003 This file is part of eStudy. 00004 messaging/messaging_new.php 00005 - Modulgruppe: Messaging 00006 - Beschreibung: Ausgabe des Formulars um neue Nachricht zu schreiben. 00007 - Version: 0.2, 21.01.2009 00008 - Autor(en): 00009 Alexander Rausch <alexander.rausch@mni.fh-giessen.de> [Refactoring WS 08/09], 00010 Waldemar Krampetz <waldemar.krampetz@mni.fh-giessen.de>, 00011 Dennis Bayer <dennis.bayer@mni.fh-giessen.de><bayer.d@gmx.de> 00012 +---------------------------------------------------------------------------+ 00013 This program is free software; you can redistribute it and/or 00014 modify it under the terms of the GNU General Public License 00015 as published by the Free Software Foundation; either version 2 00016 of the License, or any later version. 00017 +---------------------------------------------------------------------------+ 00018 This program is distributed in the hope that it will be useful, 00019 but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 GNU General Public License for more details. 00022 You should have received a copy of the GNU General Public License 00023 along with this program; if not, write to the Free Software 00024 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00025 +--------------------------------------------------------------------------*/ 00035 define("PATH_TO_ROOT", "../"); 00037 require_once (PATH_TO_ROOT."messaging/classes/class.messaging.inc.php"); 00038 /* CSS einbinden */ 00039 Messaging::includeMessagingCSSFile(); 00040 /* globale Defines setzten */ 00041 Messaging::setGlobalVariables(); 00042 00044 require_once (PATH_TO_ROOT."common/init.inc.php"); 00046 require_once (PATH_TO_ROOT."common/header.inc.php"); 00048 require_once (PATH_TO_ROOT."messaging/classes/class.messaging_new.inc.php"); 00050 require_once (PATH_TO_ROOT."messaging/classes/class.messaging_usersearch.inc.php"); 00052 require_once (PATH_TO_ROOT."messaging/classes/class.buddylist.inc.php"); 00054 require_once (PATH_TO_ROOT."common/tinymceconfig.inc.php"); 00055 00056 00057 //Javascript Includes 00058 echo Messaging::getAutoSearchJavaScript(); 00059 00060 global $js; 00061 $eStudyPage->appendJavaScriptFile($js); 00062 00063 echo '<div class="messaging_mainbox">'; 00064 00065 /* Generelle Messaging Helper Klasse initalisieren */ 00066 $messaging = new Messaging($_SESSION["userid"]); 00067 00068 /* Klasse für "Neue Nachrichten schreiben" initalisieren */ 00069 $messaging_new = new MessagingNew($messaging); 00070 00071 /* HTML von "Neue Nachricht" ausgeben */ 00072 $messaging_new->echoNewMessage(); 00073 00074 /* HTML für die Suchmaschine + Buddyliste ausgeben */ 00075 if($messaging_new->runExecution()) { 00076 00077 /* Suchformular ausgeben */ 00078 $messaging_usersearch = new MessagingUserSearch($messaging); 00079 00080 $messaging_usersearch->echoSearchForm(false); 00081 /* 00082 * DIV für Suchergebnisse 00083 */ 00084 echo "<div id='messagingSearchResults'>"; 00085 if(isset($_POST["searchAction"]) && !isset($_GET['forename'])) { 00086 $messaging_usersearch->setSearchName($_POST["searchName"]); 00087 $messaging_usersearch->setSearchForeName($_POST["searchForename"]); 00088 $messaging_usersearch->setSearchCourse($_POST["searchCourse"]); 00089 $messaging_usersearch->echoSearchResults(false); 00090 } 00091 echo "</div></div>"; 00092 00093 if($messaging_usersearch->runExecution()) { 00094 /* Buddyliste ausgeben */ 00095 echo "<div>"; 00096 $buddylist = new Buddylist($_SESSION["userid"]); 00097 $buddylist->echoBuddylist(); 00098 00099 echo "</div>"; 00100 } 00101 } 00102 ?> 00103 <?php 00105 require_once (PATH_TO_ROOT."common/footer.inc.php"); 00106 ?>
1.6.1